package com.g2room;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Test {
	 public static String getDateDir() {
	    	Calendar cal = Calendar.getInstance();
	        int month = cal.get(Calendar.MONTH) + 1;
	        int day = cal.get(Calendar.DAY_OF_MONTH);
	    	return (cal.get(Calendar.YEAR) + "" + (month > 9 ? month : "0" + month) + "" + (day > 9 ? day : "0" + day));
	    }
	 
	 public static void main(String[] args) {
		 System.out.println(getLastDay());
//		 String d1 = "2016-03-10";
//		 String d2 = "2016-03-10 00:03:05";
//		 System.out.println(d1.compareTo(d2) >= 0);
//		 System.out.println(getDateDir());
	 }
	 
	 /**
     * 获取当前日期
     * @return
     */
	public static String getLastDay() {
		Calendar cal = Calendar.getInstance();
		return date2String(cal.getTime(), "yyyy-MM-dd");
	}
	 
	public static String date2String(Date date, String pattern) {
    	SimpleDateFormat sdf = new SimpleDateFormat(pattern);
    	String dateStr = null;
    	try {
    		dateStr = sdf.format(date);
		} catch (Exception e) {
			e.printStackTrace();
		}
    	return dateStr;
    }
	 
	 
////		categoryMap.put("高考快讯", "高考");
////		categoryMap.put("各地动态", "高考");
//		categoryMap.put("院校动态", "高考");
////		categoryMap.put("高校资讯", "高考");
////		categoryMap.put("高校名单", "高考");
//		categoryMap.put("自招动态", "高考");
//		categoryMap.put("招生快讯", "高考");
////		categoryMap.put("保送动态", "高考");
	 
////		categoryMap.put("志愿填报", "高考");
////		categoryMap.put("报考指南", "高考");
////		categoryMap.put("历年分数线", "高考");
//		categoryMap.put("报考指导", "高考");
////		categoryMap.put("各校政策", "高考");
//录取政策
//报考政策
//加分政策
//体检政策
	 
//		categoryMap.put("招生访谈", "高考");
//		categoryMap.put("艺术特长生", "高考");
//		categoryMap.put("体育特长生", "高考");
//		categoryMap.put("国防生", "高考");
//		categoryMap.put("军校生", "高考");
//		categoryMap.put("招飞快讯", "高考");
//		categoryMap.put("小语种", "高考");
//		categoryMap.put("艺考快讯", "高考");
////		categoryMap.put("明星名人", "高考");
	 
//		categoryMap.put("专业解读", "高考");
//		categoryMap.put("分析评论", "高考");
//		categoryMap.put("报名信息", "高考");
	 
	 
}
